package com.swak.registry;

import java.util.Map;

import com.swak.Constants;
import com.swak.utils.Maps;

public class ExecuteWorker {
	URL url;
	Registry registry;

	public ExecuteWorker(Registry registry) {
		this.registry = registry;
		Map<String, String> parameters = Maps.newHashMap();
		parameters.put(Constants.Application_KEY, "Job");
		parameters.put(Constants.Service_Key, "WechatJob");
		parameters.put(Constants.Category_Key, "Executor");
		url = new URL("job", "127.0.0.1", 0, "/worker", parameters);
		this.registry.register(url);
	}

}
